const Service = require('../../../core/service/ApiService');

class AgedService extends Service {

    async getAgedInfo(id) {
        const dao = this.service.mobile.aged.dao;
        return dao.findAgedById(id, this.ctx.session.community_id_list);
    }

    async getAgedList(opt) {
        const dao = this.service.mobile.aged.dao;
        return {
            list: await dao.searchAged(opt.pn, opt.ps, opt.kw, this.ctx.session.community_id_list)
        }
    }
}

module.exports = AgedService;
